import requests from './request';
import mockRequests from './mockAjax'
export const reqCategoryList = ()=> requests({url:'api/product/getBaseCategoryList',method:'get'})
// console.log(this.reqCategoryList)
export const reqGetBannerList = () => mockRequests.get('/mock/banner')
export const reqFloorList = () => mockRequests.get('/mock/floor')
export const reqGetSearchInfo = (params) => requests({url:"api/list",method:"post",data:params})
export const reqGoodsInfo = (skuId) => requests({url:`api/item/${skuId}`,method:'get'})
export const reqAddOrUpdateShopCart=(skuId,skuNum)=> requests({url:`api/cart/addToCart/${skuId}/${skuNum}`,method:'post'})
export const reqCarList= ()=>requests({url:'api/cart/cartList',method:'get'});
export const reqGetCode = (phone)=>requests({url:`api/user/passport/sendCode/${phone}`,method:'get'});
export const reqUserRegister = (data)=>requests({url:'api/user/passport/register',data,method:'post'});
export const reqUserLogin = (data)=>requests({url:'api/user/passport/login',data,method:'post'});
export const reqUserInfo = ()=>requests({url:'api/user/passport/auth/getUserInfo',method:'get'});